package com.example.cognitivesystemserver.service;

import com.example.cognitivesystemserver.mapper.StudentMapper;
import com.example.cognitivesystemserver.pojo.Score;
import com.example.cognitivesystemserver.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService{

    @Autowired
    private StudentMapper student;


    @Override
    public void addStudent(Student student) {
        this.student.addStudent(student);
    }

    @Override
    public void deleteStudent(String id) {
        this.student.deleteStudent(id);
    }

    @Override
    public void updateStudent(Student student) {
        this.student.updateStudent(student);
    }

    @Override
    public Student getStudent(String StuId) {
        return this.student.getStudent(StuId);
    }

    @Override
    public List<Student> getAllStudent() {
        return this.student.getAllStudent();
    }

    @Override
    public List<Score> getStudentScore(String StuId) {return this.student.getStudentScore(StuId);}

    @Override
    public List<Score> getAllStuScore() {
        return  this.student.getAllStuScore();
    }

    @Override
    public void deleteStuScore(String StuId) {
        this.student.deleteStuScore(StuId);
    }

}